package com.example.demo.controller;

import com.example.demo.domain.Teacher;
import com.example.demo.services.TeacherService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TeacherController {
    @Resource
    private TeacherService teacherService;

    @GetMapping("/teacher/list")
    public List<Teacher> listTeacher() {
        return teacherService.listTeacher();
    }
}
